<template>
  <nm-form-dialog ref="form" v-bind="form" v-on="on" :visible.sync="visible_">
    <el-row>
      <el-col :span="20" :offset="1">
        <el-form-item label="收货人名称：" prop="userName">
          <el-input v-model="form.model.userName" clearable />
        </el-form-item>
        <el-form-item label="收货人手机：" prop="userPhone">
          <el-input v-model="form.model.userPhone" clearable />
        </el-form-item>
        <el-form-item label="区域id路径：" prop="areaIdPath">
          <el-input v-model="form.model.areaIdPath" clearable />
        </el-form-item>
        <el-form-item label="最后一级区域id：" prop="areaId">
          <el-input v-model="form.model.areaId" clearable />
        </el-form-item>
        <el-form-item label="详细地址：" prop="userAddress">
          <el-input v-model="form.model.userAddress" clearable />
        </el-form-item>
        <el-form-item label="是否默认地址：" prop="isDefault">
          <el-input v-model="form.model.isDefault" clearable />
        </el-form-item>
      </el-col>
    </el-row>
  </nm-form-dialog>
</template>
<script>
import { mixins } from 'nbmodular-ui'

const { add, edit, update } = $api.member.userAddress

export default {
  mixins: [mixins.formSave],
  data() {
    return {
      title: '用户地址表',
      actions: { add, edit, update },
      form: {
        model: {
          /** 收货人名称 */
          userName: '',
          /** 收货人手机 */
          userPhone: '',
          /** 区域id路径 */
          areaIdPath: '',
          /** 最后一级区域id */
          areaId: '',
          /** 详细地址 */
          userAddress: '',
          /** 是否默认地址 */
          isDefault: ''
        },
        rules: {}
      }
    }
  }
}
</script>
